|
SAP Convergent Charging
Java and XML APIs (Core) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.highdeal.pnr.hci.ComponentProperty
public class ComponentProperty
This Java class is a Helper class to marshal and unmarshal all the rating components.
PropertyThe XML APIs specify the following XSD fragment:
XSD Fragment
<xs:simpleType name="componentPropertyType">
<xs:restriction base="xs:string">
<xs:enumeration value="number"/>
<xs:enumeration value="decimal"/>
<xs:enumeration value="string"/>
<xs:enumeration value="date"/>
<xs:enumeration value="money"/>
<xs:enumeration value="boolean"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="property">
<xs:complexType>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="type" type="componentPropertyType"/>
<xs:attribute name="value" type="xs:string"/>
<xs:attribute name="propertyNameValue" type="xs:boolean" default="false"/>
</xs:complexType>
</xs:element>
| Field Summary | |
|---|---|
static int |
TYPE_BOOLEAN
Constant for property type boolean. |
static int |
TYPE_DATE
Constant for property type date. |
static int |
TYPE_MONEY
Constant for property type money. |
static int |
TYPE_NUMBER
Constant for property type number. |
static int |
TYPE_STRING
Constant for property type string. |
| Constructor Summary | |
|---|---|
ComponentProperty()
Constructs an empty component property. |
|
ComponentProperty(java.lang.String name,
int type,
java.lang.Object value,
boolean isPropertyNameValue)
Build the ComponentProperty from the given parameters. |
|
| Method Summary | |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element. |
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the object, the child representing
the marshallable object which must be added to the element. |
boolean |
getBooleanValue()
Returns the value of the component property as a boolean. |
java.util.Date |
getDateValue()
Returns the value of the component property as a date. |
java.math.BigDecimal |
getDecimalValue()
Returns the value of the component property as a decimal. |
Money |
getMoneyValue()
Returns the value of the component property as a money. |
java.lang.String |
getName()
Returns the name of the component property. |
java.lang.String |
getPropertyNameValue()
Returns the value of the component property as a property name. |
java.lang.String |
getStringValue()
Returns the value of the component property as a string. |
int |
getType()
Returns the type of the component property. |
java.lang.Object |
getValue()
Get the value of the component property as an object. |
boolean |
isPropertyNameValue()
Whether the property value is a property name |
void |
isPropertyNameValue(boolean isPropertyNameValue)
Set whether the component property is pointing to a property. |
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children. |
void |
marshal(XMLOutputter output,
java.lang.String fullName)
|
static void |
marshal(XMLOutputter output,
java.lang.String name,
java.math.BigDecimal value)
Helper static method to marshall a component property of type decimal. |
static void |
marshal(XMLOutputter output,
java.lang.String name,
boolean value)
Helper static method to marshall a component property of type boolean. |
static void |
marshal(XMLOutputter output,
java.lang.String name,
java.util.Date value)
Helper static method to marshall a component property of type date. |
static void |
marshal(XMLOutputter output,
java.lang.String name,
Money value)
Helper static method to marshall a component property of type money. |
static void |
marshal(XMLOutputter output,
java.lang.String name,
java.lang.String value)
Helper static method to marshall a component property of type string. |
static void |
marshal(XMLOutputter output,
java.lang.String name,
java.lang.String value,
int type)
Helper static method to marshall a component property of any type with a value which is a name property. |
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being processed. |
void |
setBooleanValue(boolean booleanValue)
Set the value of the component property with a boolean. |
void |
setDateValue(java.util.Date dateValue)
Set the value f the component property with a date. |
void |
setDecimalValue(java.math.BigDecimal decimalValue)
Set the value of the component property with a decimal. |
void |
setMoneyValue(Money moneyValue)
Set the value of the component property with a money. |
void |
setName(java.lang.String name)
Set the component property name. |
void |
setPropertyNameValue(java.lang.String propertyNameValue)
Set the value of the component property with a property name. |
void |
setStringValue(java.lang.String stringValue)
Set the value of the component property with a string. |
void |
setType(int type)
Set the component property type. |
void |
setValue(java.lang.Object value)
Set the value of the component property with an object. |
Property |
toProperty()
Convert the ComponentProperty to a Property. |
static java.lang.String |
translate(java.lang.String propertyName)
Deprecated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TYPE_STRING
public static final int TYPE_NUMBER
public static final int TYPE_DATE
public static final int TYPE_MONEY
public static final int TYPE_BOOLEAN
| Constructor Detail |
|---|
public ComponentProperty()
public ComponentProperty(java.lang.String name,
int type,
java.lang.Object value,
boolean isPropertyNameValue)
| Method Detail |
|---|
public java.lang.String getName()
public void setName(java.lang.String name)
name - The new name of the component propertypublic java.lang.String getStringValue()
public void setStringValue(java.lang.String stringValue)
stringValue - The value to set uppublic java.math.BigDecimal getDecimalValue()
public void setDecimalValue(java.math.BigDecimal decimalValue)
decimalValue - The value to set uppublic java.util.Date getDateValue()
public void setDateValue(java.util.Date dateValue)
dateValue - The value to set uppublic Money getMoneyValue()
public void setMoneyValue(Money moneyValue)
moneyValue - The value to set uppublic boolean getBooleanValue()
public void setBooleanValue(boolean booleanValue)
booleanValue - The value to set uppublic java.lang.String getPropertyNameValue()
public void setPropertyNameValue(java.lang.String propertyNameValue)
propertyNameValue - The value to set uppublic java.lang.Object getValue()
public void setValue(java.lang.Object value)
value - The value to set uppublic boolean isPropertyNameValue()
public void isPropertyNameValue(boolean isPropertyNameValue)
isPropertyNameValue - Whether the component property is pointing to a propertypublic int getType()
public void setType(int type)
type - The type to set uppublic void setAttributes(XMLAttributes atts)
XMLMarshallable
setAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void addCharacterData(java.lang.String cData)
XMLMarshallable
addCharacterData in interface XMLMarshallablecData - The character data to be added
public void addChild(java.lang.String tagName,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.
addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be added
public void marshal(XMLOutputter output,
java.lang.String fullName)
public void marshal(XMLOutputter output)
XMLMarshallable
marshal in interface XMLMarshallableoutput - The XML output to marshal the object into
public static void marshal(XMLOutputter output,
java.lang.String name,
java.lang.String value)
output - The XML outputter where the output has to goname - The name of the propertyvalue - The value of the property
public static void marshal(XMLOutputter output,
java.lang.String name,
java.util.Date value)
output - The XML outputter where the output has to goname - The name of the propertyvalue - The value of the property
public static void marshal(XMLOutputter output,
java.lang.String name,
java.math.BigDecimal value)
output - The XML outputter where the output has to goname - The name of the propertyvalue - The value of the property
public static void marshal(XMLOutputter output,
java.lang.String name,
Money value)
output - The XML outputter where the output has to goname - The name of the propertyvalue - The value of the property
public static void marshal(XMLOutputter output,
java.lang.String name,
boolean value)
output - The XML outputter where the output has to goname - The name of the propertyvalue - The value of the property
public static void marshal(XMLOutputter output,
java.lang.String name,
java.lang.String value,
int type)
output - The XML outputter where the output has to goname - The name of the propertyvalue - The value of the property (the property name to which the current property is pointing)type - The type of the property@Deprecated public static java.lang.String translate(java.lang.String propertyName)
propertyName -
public Property toProperty()
throws java.lang.IllegalArgumentException
ComponentProperty to a Property.
Property results from the conversion
java.lang.IllegalArgumentException - throws if the type of the ComponentProperty is not TYPE_DATE, TYPE_NUMBER neither TYPE_STRING
|
Document Published: October 2015 (SAP CC 4.0 SP10 and Later) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||